package com.example.hackotontest;

import com.example.hackotontest.communication.SalahorCommunicationActivity;
import com.example.hackotontest.communication.ScrumMasterCommunicationActivity;

import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.view.View.OnClickListener;
import android.content.Intent;
import android.graphics.Typeface;
import android.view.Menu;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

public class MenuActivity extends Activity implements OnClickListener {

	public static Typeface tf;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_menu);

		tf = Typeface.createFromAsset(getAssets(), "data/fonts/font.ttf");

		TextView tv = (TextView) findViewById(R.id.meeting);
		TextView tv1 = (TextView) findViewById(R.id.about);
		TextView tv2 = (TextView) findViewById(R.id.exit);

		tv.setTypeface(tf);
		tv1.setTypeface(tf);
		tv2.setTypeface(tf);

		tv.setOnClickListener(this);
		tv1.setOnClickListener(this);
		tv2.setOnClickListener(this);

	}

	public void onClick(View v) {

		switch (v.getId()) {
		case R.id.meeting:
			Intent iScrum = new Intent(this, LoginActivity.class);
			startActivity(iScrum);
			// Intent iScrum = new Intent(this, ScrumMasterCommunicationActivity.class);
			// startActivity(iScrum);
			break;
		case R.id.about:
			// Intent iTeam = new Intent(this, SalahorCommunicationActivity.class);
			// startActivity(iTeam);
			makeDialog();
			break;
		case R.id.exit:
			finish();
			break;
		}

	}

	private void makeDialog() {

		AlertDialog.Builder dialog = new AlertDialog.Builder(this);
		dialog.setMessage("Made by The Legion.");

		dialog.setNegativeButton("Close", new DialogInterface.OnClickListener() {
			public void onClick(DialogInterface arg0, int arg1) {
			}
		});

		dialog.show();
	}
}
